#include "app_runner.h"
#define DEVICE_FILE "/dev/ttyS1"
static int is_running = 1;
void exit_handler(int signum){
    log_debug("接收到结束进程信号");

    is_running = 0;
}void app_runner_run(void)
{
    //注册信号处理函数
    signal(SIGINT, exit_handler);
    signal(SIGTERM, exit_handler);
    app_pool_init(5);
    app_mqtt_init();
    Device *device= app_device_init(DEVICE_FILE);
    app_bt_init(device);
    app_device_start();

    while(is_running){
        sleep(1);
    }
    //释放资源
    app_pool_close();
    app_mqtt_close();
    app_device_free();

}